package com.heima.behavior.controller;

import com.heima.apis.behavior.ApCollectionBehaviorControllerApi;
import com.heima.behavior.service.ApCollectionBehaviorService;
import com.heima.model.article.dto.CollectionBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/collectionBehavior")
public class ApCollectionBehaviorController implements ApCollectionBehaviorControllerApi {

    @Autowired
    ApCollectionBehaviorService collectionBehaviorService;

    /**
     * 收藏行为
     * @param dto
     * @return
     */
    @PostMapping("/collection")
    @Override
    public ResponseResult collection(CollectionBehaviorDto dto) {

        return collectionBehaviorService.collection(dto);
    }
}
